<?

function drivelist($path){
	global $context;
	$context=$context. "[文件展示]</br>";
	$dr = @opendir($path);
   if(!$dr) {
     $context=$context. "Error opening the ".$path." directory!<BR>";
     exit;
   }
 
   while(($files[] = readdir($dr)) !== false);
 
   foreach($files as $value){
	   $context=$context. $value."</br>";
   }

}

$path="upload/".$_POST['path'];
global $context;
drivelist(__DIR__."\\".strtr($path,'/',"\\"));

echo '<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" /><style>html,body,iframe{width:100%;height:99.5%;padding:0;margin:0}#wrap{width:100%;height:100%}iframe{border:0}</style><div id="wrap"><iframe src="/tips.php?context='.$context.'"></iframe></div></html>';

?>